Skip to content

fix: Allow imported audio below -12 dB - #666

Open
apodacaduron wants to merge 2 commits into
getopenscreen:mainfrom
apodacaduron:allow-lower-audio-track-gain
Open

apodacaduron wants to merge 2 commits into
getopenscreen:mainfrom
apodacaduron:allow-lower-audio-track-gain

Conversation

@apodacaduron

@apodacaduron apodacaduron commented Sep 14, 2026

Copy link
Copy Markdown

Summary

Allow imported audio tracks to be lowered below -12 dB in the inspector.

Imported audio tracks already support gain down to -60 dB in the document schema, agent tools, and native mixer/export path. The inspector slider was reusing the global output gain range (-12..+12 dB), which made background music beds stay too loud even though quieter values were already supported internally.

This keeps the global output slider unchanged and only expands the per-track imported audio gain control to -60..+12 dB.

Related issue

Refs #

Type of change

  • Bug fix
  • Feature
  • Enhancement
  • Documentation
  • Refactor / maintenance
  • Performance
  • Security

Release impact

  • Patch
  • Minor
  • Major / breaking change
  • No release note needed

Desktop impact

  • Windows
  • macOS
  • Linux
  • Installer / packaging
  • Not platform-specific

Screenshots / video

N/A

Testing

  • npm test -- src/components/ai-edition/RightPanes.audioTrack.test.tsx src/lib/ai-edition/document/audioTracks.test.ts src/components/ai-edition/VirtualPreview.audio.test.ts src/native/sceneDescription.test.ts
  • npm run i18n:check
  • npx tsc --noEmit
  • Manual: verified the imported audio track inspector can set the output level below -12 dB.

Summary by CodeRabbit

  • New Features
    • Per-track audio gain controls now support levels from -60 dB to +12 dB, allowing imported tracks to be lowered below -12 dB.
    • Changes to the per-track gain setting are applied at the selected level.

@coderabbitai

coderabbitai Bot commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 44912dec-ba4a-4fff-a60f-221be2344c95

📥 Commits

Reviewing files that changed from the base of the PR and between 4957925 and 36d271a.

📒 Files selected for processing (2)
  • src/components/ai-edition/RightPanes.tsx
  • src/lib/ai-edition/store/editorSettings.ts

Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review.


📝 Walkthrough

Walkthrough

The per-track audio gain slider now supports values from -60 dB to 12 dB. The change adds dedicated bounds and tests setting an imported track to -24 dB. The global output gain slider keeps its existing range.

Changes

Audio track gain

Layer / File(s) Summary
Track gain bounds and control
src/lib/ai-edition/store/editorSettings.ts, src/components/ai-edition/RightPanes.tsx, src/components/ai-edition/RightPanes.audioTrack.test.tsx
Adds AUDIO_TRACK_GAIN_DB_MIN and AUDIO_TRACK_GAIN_DB_MAX. The per-track slider uses these bounds. Tests verify the -60 to 12 range and setting -24 dB.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to 36d27

Imported tracks can use the wider gain range without changing the global output control. No actionable merge-blocking risk is established.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: allowing imported audio tracks to go below -12 dB.
Description check ✅ Passed The description covers the change, type, release impact, desktop impact, and testing. The related-issue section has no issue number, but the description is otherwise complete.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 3 files.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@apodacaduron apodacaduron changed the title Allow imported audio below -12 dB fix: Allow imported audio below -12 dB Sep 23, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant